home *** CD-ROM | disk | FTP | other *** search
- Path: ts1-017.jaxnet.com!user
- From: garyg@jax.jaxnet.com (Gary M. Greenberg)
- Newsgroups: comp.lang.c
- Subject: Re: Please Please Help! - pointer notation
- Date: Wed, 28 Feb 1996 07:26:58 -0500
- Organization: Southeast Network Services, Inc.
- Message-ID: <garyg-2802960726580001@ts1-017.jaxnet.com>
- References: <4gnlv9$1fh@news.mistral.co.uk>
- NNTP-Posting-Host: ts1-017.jaxnet.com
-
- In article <4gnlv9$1fh@news.mistral.co.uk>, mikebarnard@mistral.co.uk
- (Mike Barnard) wrote:
-
- > Hi.
- >
- > I'm reposting this as I've had no replies and I'm still without the
- > information.
- >
- > I've read my C book. I've gotten th C FAQ. I've read the file
- > "ptrtutor.txt" a tutorial on pointers. But I havn't seen explained the
- > following. Can you help?
- >
- > Sometimes when prototyping a function the function name is pre-fixed
- > by an asterisk. Why? What does it mean? This is a quote from the
- > pointer tutorial text by Ted Jensen...
-
- In this instance, it means that the function has a return type of "char *" so
- that the function 'my_strcpy()' is a function returning a pointer to an
- array of characters.
-
- Remember that:
- "char * str;"
- is equivalent to:
- "char* str;"
- which is equivalent to:
- "char *str;"
-
- Why should it be different because the object being defined is a function?
-
- The last couple of issues of the C/C++ Users Journal has some decent articles
- explaining how to understand the syntax involved here and in much more complex
- cases.
-
- [snip]
-
- gary /* the Sorcerer's Apprentice */
-
- Free Speech in America murdered by the Communications Decency Act.
- U.S. Congress == Collective Moron
- Hey, U.S. Government ->> "And the horse you rode in on!"
-